import { observable, computed, action } from 'mobx';
// import ImgModel from '../modules/img/model';
// import CircleModel from '../modules/circle/model';
// import PolygonModel from '../modules/polygon/model';
import TextModel from '../modules/text/model';
// import VideoModel from '../modules/video/model';
// import SquaModel from '../modules/squa/model';

export default class Store {
  @observable area = [];
  @observable selected = [];

  constructor() {

  }

  @action addArea() {
    const newArea = new TextModel({
      width: 100,
      height: 100,
      top: 100,
      left: 100,
    });
    this.area.push(newArea);
    this.selected = newArea;
  }


  @action delArea(index) {
    this.area.splice(index, 1);
    this.selected = [];
  }
  @action setSelected(modal) {
    this.selected = modal;
  }

}




